<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('custom_report', function (Blueprint $table) {
            $table->id()->comment('id');
$table->string('report_name', 100)->comment('报表名称');
$table->string('table_name', 100)->comment('视图/表名称');
$table->string('route_path', 200)->comment('路由路径');
$table->json('fields_json')->comment('字段配置json');
$table->creatorId();
$table->createdAt();
$table->updatedAt();
$table->deletedAt();

$table->engine='InnoDB';
$table->comment('自定义报表');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('custom_report');
    }
};
